#pragma once

#include "CalcThreadHolder.h"
#include "Approach.h"

struct NewCalcParam;

class CTrajectoryBuilder
{
public:
	CTrajectoryBuilder(OnErrorNotifyInterface *pNotyInterface);
	~CTrajectoryBuilder(void);

	bool Prepare();
	bool Calc(IApproachHolder *pAppHolderInterface, NewCalcParam * param);
	bool IsWork() const;
	bool GetTimeRange(double &dStart, double &dTo);
	bool GetRefRange(CGridParam * param);

	bool OnError(LPCTSTR stzError);
protected:
	OnErrorNotifyInterface	*m_pNotyInterface;

	CCalcThreadHolderAP m_pCalcThreadHolder;

	double		m_dRefRangeKm;
	double		m_dStartTime;
	double		m_dEndTime;
	Body		m_bodyRefPos;
};
